package com.bdcom.model;

import java.awt.Point;

public abstract class AbstractDevice implements IDevice {
	
	//设备所在位置
	private Point point;
	//设备名称
	private String deviceName;
	//mac地址
	private String macAddress;
	//设备属性
	private DeviceType deviceType;
	
	//sub getter and setter
	public Point getPoint() {
		return point;
	}

	public void setPoint(Point point) {
		this.point = point;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}

	public DeviceType getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(DeviceType deviceType) {
		this.deviceType = deviceType;
	}
	//end sub getter and setter
	
	public void drag(double deltax, double deltay) {
		// TODO Auto-generated method stub
		getPoint().translate((int)deltax, (int)deltay);
	}
}
